package com.zwb.demo.strategy;

import org.springframework.stereotype.Component;

/**
 * @author 2825075112@qq.com
 */
@Component
public class IntCellParser implements ICellParser {
    @Override
    public String name() {
        return "int";
    }

    @Override
    public Object defaultValue() {
        return 0;
    }

    @Override
    public Object parseStringCellValue(String stringCellValue) {
        return stringCellValue.equals("") ? 0 : Integer.parseInt(stringCellValue);
    }

    @Override
    public String javaClass() {
        return "int";
    }

    @Override
    public String goClass() {
        return "int32";
    }
}
